package com.education.myoschinatest.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by zhonghang on 16/8/31.
 */

public class DouyuSqlHelper extends SQLiteOpenHelper {
    public DouyuSqlHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
        //
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        // 第一次创建数据库会调用
        db.execSQL("create table xxx (integer id primary key autoincrement , ) ");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        //数据库升级
    }
}
